{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% block title %}新增文章{% endblock %}
{% block header %}新增文章{% endblock %}
{% block content %}
<form action="." method="POST">
    {% csrf_token %}

    {{ form|crispy }}

    <button type="submit" class="btn btn-primary bt-2 btn-block btn-lg">发布</button>
</form>

{% endblock %}





<!-- <form action="." method="POST">
    {% csrf_token %}
    <div class="form-group">
        <label for="author">作者</label>
        <input type="text" class="form-control" id="author" name="author" placeholder="输入作者名称">
    </div>
    <div class="form-group">
        <label for="title">标题</label>
        <input type="text" class="form-control" id="title" name="title" placeholder="输入文章标题">
    </div>
    <div class="form-group">
        <label for="content_">内容</label>
        <textarea name="content_" id="content_" class="form-control"></textarea>
    </div>
    <div class="form-check form-check-inline">
        <input type="radio" class="form-check-input" id="o" name="category" value="O">
        <label for="o" class="form-check-label">原创</label>
    </div>
    <div class="form-check form-check-inline">
        <input type="radio" class="form-check-input" id="r" name="category" value="R">
        <label for="r" class="form-check-label">转载</label>
    </div>
    <br>
    <div class="form-group">
        <label for="kind">分类专栏</label>
        <select name="kind" id="kind" class="form-control">
            {% for kind in kinds %}
            <option value="{{ kind.pk }}">{{ kind }}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form-group">
        <label for="tag">文章标签</label>
        <select name="tag" id="tag" class="form-control">
            {% for tag in tags %}
            <option value="{{ tag.pk }}">{{ tag }}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form-check form-check-inline">
        <input type="radio" class="form-check-input" id="public" name="permission" value="public">
        <label for="public" class="form-check-label">公开</label>
    </div>
    <div class="form-check form-check-inline">
        <input type="radio" class="form-check-input" id="private" name="permission" value="private">
        <label for="private" class="form-check-label">秘密</label>
    </div>
    <div class="form-check form-check-inline">
        <input type="radio" class="form-check-input" id="fans" name="permission" value="fans">
        <label for="fans" class="form-check-label">仅粉丝可见</label>
    </div>
    <br>
    <button type="submit" class="btn btn-primary mt-2 btn-block btn-lg">发布</button>
</form> -->